GridCore: add ai assistant toolbar item#33189
Open
anna-shakhova wants to merge 4 commits intoDevExpress:26_1from
Open
GridCore: add ai assistant toolbar item#33189anna-shakhova wants to merge 4 commits intoDevExpress:26_1from
anna-shakhova wants to merge 4 commits intoDevExpress:26_1from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces an AI Assistant feature hook for DataGrid/TreeList by adding aiAssistant options, wiring a controller/view pair, and registering a toolbar button in the header panel that toggles an AI chat popup.
Changes:
- Add
aiAssistantconfiguration (enabled,title) with per-grid default options and internal option typing. - Implement a new
AIAssistantViewControllerthat registers/removes a header toolbar button and delegatesshow/hide/toggleto the view. - Extend the AI chat wrapper to support
toggle()and adjust default popup options.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/__internal/grids/tree_list/module_not_extended/ai_assistant.ts | Switch to new AI assistant view/controller names and add default aiAssistant options. |
| packages/devextreme/js/__internal/grids/data_grid/module_not_extended/ai_assistant.ts | Same as TreeList: wire new view/controller and add default aiAssistant options. |
| packages/devextreme/js/__internal/grids/grid_core/m_types.ts | Add internal aiAssistant option typing. |
| packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts | Make _getToolbarButtonClass callable from outside the class (now used by AI assistant button init). |
| packages/devextreme/js/__internal/grids/grid_core/ai_chat/const.ts | Update default popup options (shading: false). |
| packages/devextreme/js/__internal/grids/grid_core/ai_chat/ai_chat.ts | Use internal popup implementation import and add toggle() API on AIChat. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_view_controller.ts | Remove legacy AI assistant controller implementation (replaced by new controller). |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/m_ai_assistant_view_controller.test.ts | Remove legacy unit tests for the old controller. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts | Make isVisible() strictly boolean and add toggle() delegating to AI chat. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts | New controller registering/removing a header toolbar item and delegating show/hide/toggle. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view.test.ts | Update imports to match new file layout. |
| packages/devextreme/js/__internal/grids/grid_core/ai_assistant/tests/ai_assistant_view_controller.integration.test.ts | Add integration tests for toolbar registration, option changes, a11y attribute, and delegation. |
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/module_not_extended/ai_assistant.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/tree_list/module_not_extended/ai_assistant.ts
Show resolved
Hide resolved
21ebe3c to
94a38e7
Compare
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/header_panel/m_header_panel.ts
Outdated
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/module_not_extended/ai_assistant.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts
Show resolved
Hide resolved
f4fb1ec to
ce86ab0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view.ts:42
aiChatInstanceis lazily created in_renderCore(), but it’s declared with a definite assignment assertion (!) while the methods still treat it as optional via?./fallbacks. Consider making the field optional (AIChat | undefined) to accurately reflect its lifecycle and avoid masking initialization issues.
packages/devextreme/js/__internal/grids/grid_core/ai_assistant/ai_assistant_view_controller.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/data_grid/module_not_extended/ai_assistant.ts
Show resolved
Hide resolved
packages/devextreme/js/__internal/grids/tree_list/module_not_extended/ai_assistant.ts
Show resolved
Hide resolved
ce86ab0 to
81ee689
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.